home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbtools1.arc / AECTRLTM.BAS < prev    next >
BASIC Source File  |  1987-01-11  |  512b  |  18 lines

  1. rem $linesize:132
  2. rem $title:'Application Engineer Standard Routines'
  3. rem $subtitle:'Trim both Control & Space characters'
  4. '                Include the COMMON values
  5. rem $include:'AESHARED.BAS'            
  6.     
  7. sub ctrl.trim(ctrl.ch$) static
  8.     for j%=0% to 31%
  9.         temp$=chr$(j%)
  10.         b%=instr(ctrl.ch$,temp$)
  11.         while b%
  12.             mid$(ctrl.ch$,b%,1%)=chr$(32%)
  13.             b%=instr(ctrl.ch$,temp$)
  14.         wend
  15.     next j%
  16.     call trim(ctrl.ch$)
  17. end sub
  18.